package com.hjw.weixun.service.impl;

import java.util.List;

import com.hjw.weixun.dao.UserDao;
import com.hjw.weixun.dao.impl.UserDaoJdbcImpl;
import com.hjw.weixun.domain.User;
import com.hjw.weixun.domain.Weixun;
import com.hjw.weixun.service.UserService;

/**
 * 
 * @author henry_chen service 接口
 */
public class UserServiceImpl implements UserService {

	// UserDao
	private UserDao userdao = UserDaoJdbcImpl.getInstance();

	public static UserService userService;

	// 单例
	public static UserService getInstance() {
		if (userService == null) {
			userService = new UserServiceImpl();
		}
		return userService;
	}

	@Override
	public void addUser(User user) {
		userdao.addUser(user);
	}

	@Override
	public User getUser(User user) {
		return userdao.getUser(user);
	}

	@Override
	public List<User> getFollowedList(Weixun weixun) {
		return userdao.getFollowedList(weixun);
	}

	
	
}
